package com.guyu.plugin.sms.suoyou.config;

import com.guyu.plugin.sms.SmsSupplierConstant;
import com.guyu.plugin.sms.suoyou.service.SuoyouSmsImpl;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.dromara.sms4j.provider.factory.AbstractProviderFactory;

@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class SuoyouFactory extends AbstractProviderFactory<SuoyouSmsImpl, SuoyouConfig> {
    private static final SuoyouFactory INSTANCE = new SuoyouFactory();

    /**
     * 获取建造者实例
     *
     * @return 建造者实例
     */
    public static SuoyouFactory instance() {
        return INSTANCE;
    }

    @Override
    public SuoyouSmsImpl createSms(SuoyouConfig suoyouConfig) {
        return new SuoyouSmsImpl(suoyouConfig);
    }

    @Override
    public String getSupplier() {
        return SmsSupplierConstant.SUOYOU;
    }
}
